FROM node:14.19.3-alpine3.15
COPY ./ /k8s-demo-frontend
WORKDIR /k8s-demo-frontend
RUN npm install --no-package-lock --registry=https://registry.npmmirror.com && npm run build

FROM nginx:1.15-alpine
COPY --from=0 /k8s-demo-frontend/dist /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
